package com.sy.simpleegg.room.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey


@Entity(tableName = "tb_coin")
data class CoinEntity(
    @PrimaryKey(autoGenerate = true)
    var id: Long = 0,
    /**
     * 当班代号
     */
    @ColumnInfo(name = "name")
    var name: String? = null,

    /**
     * 当班代号
     */
    @ColumnInfo(name = "orderNumber")
    var orderNumber: String? = null,

    /**
     * 日期：yyyy-MM-dd
     */
    @ColumnInfo(name = "date")
    var date: String? = null,

    /**
     * 时间：HH:mm:ss
     */
    @ColumnInfo(name = "time")
    var time: String? = null,

    /**
     * 币数
     */
    @ColumnInfo(name = "coins")
    var coins: Long = 0,

    /**
     * 0-出币 1-补币 2-清币
     */
    @ColumnInfo(name = "type")
    var type: Int = 0,

    /**
     * 出币总数
     */
    @ColumnInfo(name = "outCoinTotal")
    var outCoinTotal: Long = 0,

    /**
     * 补币总数
     */
    @ColumnInfo(name = "buCoinTotal")
    var buCoinTotal: Long = 0,

    /**
     * 清币总数
     */
    @ColumnInfo(name = "clearCoinTotal")
    var clearCoinTotal: Long = 0,

    /**
     * 剩余币数
     */
    @ColumnInfo(name = "remainCoin")
    var remainCoin: Long = 0

) {
    @Ignore()
    constructor() : this(0)
}
